package com.vic.kjlink.order.model;

import java.util.Date;

import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

import pers.vic.boot.base.model.BaseEntity;
import pers.vic.boot.util.poi.export.ExcelField;

/**
 * 点餐表 实体类
 * 
 * @author Vic.xu
 */
public class Orders extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date date;

    /**
     * 开启点餐id
     */
    private Integer startId;

    /**
     * 套餐id foodId
     */
    private Integer packageId;

    /**
     * 套餐描述
     */
    @ExcelField(title = "套餐", sort = 5)
    private String describe;

    /**
     * 工号
     */
    private String userCode;

    /**
     * 姓名
     */
    @ExcelField(title = "姓名", sort = 3)
    private String userName;

    /**
     * 部门
     */
    @ExcelField(title = "部门", sort = 2)
    private String departmentName;

    // 标题 startId -->title
    @ExcelField(title = "标题", sort = 6)
    private String startTitle;

    @ExcelField(title = "日期", sort = 1)
    public String findDateStr() {
        return DateFormatUtils.format(date, "yyyy-MM-dd");
    }

    /***************** set|get start **************************************/
    /**
     * set：日期
     */
    public Orders setDate(Date date) {
        this.date = date;
        return this;
    }

    /**
     * get：日期
     */
    public Date getDate() {
        return date;
    }

    public Integer getStartId() {
        return startId;
    }

    public void setStartId(Integer startId) {
        this.startId = startId;
    }

    /**
     * set：套餐id
     */
    public Orders setPackageId(Integer packageId) {
        this.packageId = packageId;
        return this;
    }

    /**
     * get：套餐id
     */
    public Integer getPackageId() {
        return packageId;
    }

    /**
     * set：套餐描述
     */
    public Orders setDescribe(String describe) {
        this.describe = describe;
        return this;
    }

    /**
     * get：套餐描述
     */
    public String getDescribe() {
        return describe;
    }

    /**
     * set：工号
     */
    public Orders setUserCode(String userCode) {
        this.userCode = userCode;
        return this;
    }

    /**
     * get：工号
     */
    public String getUserCode() {
        return userCode;
    }

    /**
     * set：姓名
     */
    public Orders setUserName(String userName) {
        this.userName = userName;
        return this;
    }

    /**
     * get：姓名
     */
    public String getUserName() {
        return userName;
    }

    /**
     * set：部门
     */
    public Orders setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
        return this;
    }

    /**
     * get：部门
     */
    public String getDepartmentName() {
        return departmentName;
    }

    public String getStartTitle() {
        return startTitle;
    }

    public void setStartTitle(String startTitle) {
        this.startTitle = startTitle;
    }
    /***************** set|get end **************************************/
}
